package com.example.fuckumusic.login;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;

import com.example.fuckumusic.R;
import com.example.fuckumusic.listener.LoginListener;

public class LoginPage extends Activity {

	private ImageView backimg;

	private Button loginBtn;

	private EditText usernameTxt, passwordTxt;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.login_page);
		findId();
		loginBtn.setOnClickListener(new LoginListener(this, usernameTxt,
				passwordTxt));

		backimg.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				finish();

			}
		});
	}

	private void findId() {
		backimg = (ImageView) findViewById(R.id.back_btn);
		loginBtn = (Button) findViewById(R.id.button1);
		usernameTxt = (EditText) findViewById(R.id.login_num);
		passwordTxt = (EditText) findViewById(R.id.login_psw);
	}
}
